package com.service.impl;

import com.bean.Market;
import com.dao.MarketMapper;
import com.service.MarketServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("marketServices")
public class MarketServicesImpl implements MarketServices {

    @Autowired
    private MarketMapper marketMapper;
    @Override
    public int save(Market market) {
        return marketMapper.update(market);
    }

    @Override
    public int remove(Market market) {
        return marketMapper.delete(market);
    }

    @Override
    public int modify(Market market) {
        return marketMapper.update(market);
    }

    @Override
    public List<Market> find(Market market) {
        return marketMapper.select(market);
    }

    @Override
    public int count(Map<String, Object> map) {
        return marketMapper.selectCount(map);
    }

    @Override
    public List<Market> query(Map<String, Object> map) {
        return marketMapper.selectByPage(map);
    }
}
